<?xml version="1.0" encoding="UTF-8"?>
<!--
  Created by IntelliJ IDEA.
  User: imon
  Date: 2/18/13
  Time: 9:06 PM
-->
<ui:composition template="templates/layout.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="#{var['layout.title']}">
        <title>#{msg['requestIssue.title']}</title>
    </ui:define>

    <ui:define name="#{var['layout.content']}">
        <ui:include src="templates/user_menu.xhtml"/>

        <div>
            <div class="request-issue">

                <h3>Request Issue</h3>
                <h:form id="requestForm">
                    <p:messages id="msgs" autoUpdate="true" closable="true"/>
                    <h:panelGrid columns="2">
                        <p:outputLabel for="title" value="#{msg['requestIssue.outputLabel.title']}"/>
                        <p:inputText id="title" required="true" requiredMessage="#{msg['requestIssue.outputLabel.title.requiredMsg']}" size="26"
                                     value="#{requestIssueController.issue.title}"/>

                        <p:outputLabel for="helpFor" value="#{msg['requestIssue.outputLabel.helpFor']}"/>
                        <p:inputText id="helpFor" required="true" requiredMessage="#{msg['requestIssue.outputLabel.helpFor.requiredMsg']}" size="26"
                                     value="#{requestIssueController.issue.helpFor}"/>

                        <p:outputLabel for="description" value="#{msg['requestIssue.outputLabel.description']}"/>
                        <p:editor id="description" required="true" requiredMessage="#{msg['requestIssue.outputLabel.description.requiredMsg']}" value="#{requestIssueController.issue.description}"/>

                        <p:outputLabel for="requiredAmount" value="#{msg['requestIssue.outputLabel.requiredAmount']}"/>
                        <p:inputText id="requiredAmount" required="true" size="26" requiredMessage="#{msg['requestIssue.outputLabel.requiredAmount.requiredMsg']}"
                                     value="#{requestIssueController.issue.requiredAmount}"/>
                        <p:spacer/>
                        <p:commandButton action="#{requestIssueController.requestIssue}" value="#{msg['requestIssue.submit']}"/>
                    </h:panelGrid>
                </h:form>

            </div>
        </div>
    </ui:define>

</ui:composition>